A conventional software driver module for a Redundant Array of Independent Disks (RAID) system allocates resources, such as Hardware Abstraction Layer (HAL) packets, RAID Core Layer (RCL) packets and dynamic memory, in performing different tasks. Requests to allocate the resources can fail if a provided memory pool is insufficient. The resource allocation requests can be initiated by any sub-module in the driver module. Each resource failure can result in a resource failure recovery handling routine being performed by many different modules.
Referring to FIG. 1, a diagram of a module layering of a conventional software RAID driver 10 is shown. The software RAID driver 10 illustrated has three layers and each layer has multiple recovery modules. Each resource failure is handled separately within each layer. As a result, recovery from a single failure can be repeated several times across the various layers. Furthermore, no mechanism is in place to throttle back other commands to give time for recovery from the failed commands. Some complexities involved in the above layered approach often lead software driver developers to allocate excessive numbers of resources and expect the resource allocations not to fail. As a result, the possibility of increasing outstanding commands or performance is commonly reduced. The resulting drivers are not able to configure dynamically to achieve a maximum throughput.